#include "SMPPQosTimeToLive.hpp"

using namespace smpp::pdu;

QosTimeToLive::QosTimeToLive(const quint32 nValue):
TLV(TLVtags::TAG_QOS_TIME_TO_LIVE,4),_Value(nValue){}

QosTimeToLive::QosTimeToLive(const QosTimeToLive &nQosTimeToLive):
TLV(nQosTimeToLive),_Value(nQosTimeToLive.getValue()){}

bool QosTimeToLive::operator ==(const QosTimeToLive &nQosTimeToLive) const{
	return (TLV::operator == (nQosTimeToLive) && 
			_Value == nQosTimeToLive.getValue());
}

bool QosTimeToLive::operator !=(const QosTimeToLive &nQosTimeToLive) const{
	return !this->operator == (nQosTimeToLive);
}

QosTimeToLive &QosTimeToLive::operator =(
	const QosTimeToLive &nQosTimeToLive){
	if(*this == nQosTimeToLive)
		return *this;
	TLV::operator = (nQosTimeToLive);
	_Value = nQosTimeToLive.getValue();
	return *this;
}

void QosTimeToLive::setValue(const quint32 nValue){
	_Value = nValue;
}

const quint32 QosTimeToLive::getValue() const{
	return _Value;
}
